package p2shapesv2;

public class Circle extends Shape {
	private float radius;
	
	public Circle(){
		radius = 1;
		setArea( (float) (Math.PI * radius * radius) );
		setPerimeter( (float) (2 * Math.PI * radius) );
	}
	
	public void setRadius(float r){
		if (r < 0)
			return;
		radius = r;
		setArea( (float) (Math.PI * r * r) );
		setPerimeter( (float) (2 * Math.PI * r) );
	}
	
	public String toString(){
		return " radius: " + radius + super.toString();
	}
}
